#include "trianglewidget.h"
#include<QPainter>
TriangleWidget::TriangleWidget(QWidget *parent) :
    QWidget(parent)
{

}

void TriangleWidget::paintEvent(QPaintEvent *event){
    Q_UNUSED(event);

    QPainter painter(this);
    painter.setRenderHint(QPainter::Antialiasing,true);

    painter.setPen(Qt::NoPen);
    painter.setBrush(QColor(0,0,0));

    QPolygonF triangle;
    triangle << QPointF(0,40)
             << QPointF(15,30)
             << QPointF(15,50);
    painter.drawPolygon(triangle);
}
